﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>试卷详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../static/css/font.css">
    <link rel="stylesheet" href="../../../static/css/weadmin.css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .showleft {
            text-align: left;
            min-width: 150px;
        }

        .longlabel {
            width: 80%;
            min-width: 400px;
        }
    </style>
</head>
<body>
    <div class="weadmin-body">
        <div class="layui-form-item">
            <label for="EPName" class="layui-form-label">
                试卷名称：
            </label>
            <label id="EPName" class="layui-form-label showleft longlabel">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPTID" class="layui-form-label">
                试卷类型：
            </label>
            <label id="EPTName" class="layui-form-label showleft">
            </label>
            <label for="EPFullMarks" class="layui-form-label">
                试卷满分：
            </label>
            <label id="EPFullMarks" class="layui-form-label showleft">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="DepNames" class="layui-form-label">
                考试部门：
            </label>
            <label id="DepNames" class="layui-form-label showleft longlabel">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPExamDuration" class="layui-form-label">
                时长(分)：
            </label>
            <label id="EPExamDuration" class="layui-form-label showleft">
            </label>
            <label for="EPExaminer" class="layui-form-label">
                监考人：
            </label>
            <label id="EPExaminer" class="layui-form-label showleft">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPDescribe" class="layui-form-label">
                试卷描述：
            </label>
            <label id="EPDescribe" class="layui-form-label showleft longlabel">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPRoom" class="layui-form-label">
                考场：
            </label>
            <label id="EPRoom" class="layui-form-label showleft">
            </label>
            <label for="EPIsRelease" class="layui-form-label">
                在发布：
            </label>
            <label id="EPIsRelease" class="layui-form-label showleft">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPStartTime" class="layui-form-label">
                开始时间：
            </label>
            <label id="EPStartTime" class="layui-form-label showleft">
            </label>
            <label for="EPEndTime" class="layui-form-label">
                结束时间：
            </label>
            <label id="EPEndTime" class="layui-form-label showleft">
            </label>
        </div>
        <div class="layui-form-item">
            <label for="EPExaminer" class="layui-form-label">
                创建者：
            </label>
            <label id="EPAddEmpID" class="layui-form-label showleft">
            </label>
            <label for="EPExaminer" class="layui-form-label">
                创建时间：
            </label>
            <label id="EPAddDateTime" class="layui-form-label showleft">
            </label>
        </div>
    </div>
    <script src="../../../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../../../static/js/common.js" charset="utf-8"></script>

    <script>
        layui.use(['jquery', 'layer'], function () {
            var $ = layui.jquery,
                layer = layui.layer;
            $.support.cors = true;
            $.ajaxSetup({
                cache: false,
                headers: {
                    "userid": JSON.parse(window.localStorage.authInfo).UserId,
                    "signtoken": JSON.parse(window.localStorage.authInfo).SignToken,
                },
            })
            $(function () {
                $.ajax({
                    url: ApiUrl + "ExamPaperMain/GetSingle",
                    type: 'get',
                    dataType: 'json',
                    data: { id: getUrlParam("ID")},
                    success: function (data) {
                        console.log(data)
                        if (data.StatusCode == 200 && data.Count != 0) {
                            $.each(data.Data[0], function (name, value) {
                                if (name == "EPIsRelease") {
                                    $("#" + name).html(value == "1" ? "是" : "否");
                                }
                                else if (name == "EPStartTime" || name == "EPEndTime" || name == "EPAddDateTime") {
                                    $("#" + name).html(value.length > 0 ? value.substr(0, 10) : "");
                                }
                                else {
                                    $("#" + name).html(value);
                                }
                            });
                        }
                        else if (data.StatusCode == 403) {
                            top.layer.alert(data.Info + ",请重新登录！", { closeBtn: 0 }, function () {
                                top.location.href = "http://" + top.location.host + "/login.html";
                            })
                        }
                        else {
                            layer.msg(data.Info);
                        }
                    }
                });
            })
        });
    </script>
</body>
</html>